package com.ctshk.rpc.cms.mapper;

import com.ctshk.rpc.cms.entity.Content;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 内容管理表 Mapper 接口
 * </p>
 *
 * @author LiZhiming
 * @since 2021-04-23
 */
public interface ContentMapper extends BaseMapper<Content> {

    @Update("update t_content set status = #{status} where id=#{id}")
    int updateStatusById(@Param("id")Long id, @Param("status")Integer status);

    @Update("update t_content set browse_count = browse_count+1 where id=#{id}")
    int updateCountById(@Param("id")Long id);
}
